package com.ecoolex.ying.space.core.manager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ecoolex.framework.modularize.api.service.storage.StorageService;
import com.ecoolex.framework.modularize.api.service.storage.process.ImageProcess;
import com.ecoolex.framework.modularize.api.service.storage.zoom.AdaptiveCenterCuttingZoom;


@Component
public class ShareImageManager {

    @Autowired
    private StorageService storageService;

    public void addShareImage(String storageId) {
        ImageProcess shareImage = new ImageProcess();
        shareImage.setSync(false);
        shareImage.setKey("shareImage");
        shareImage.setQuality(0.8F);
        shareImage.setZoomMode(new AdaptiveCenterCuttingZoom(300, 300));
        storageService.addProcess(storageId, shareImage);
    }
}
